/*
 * =====================================================================================
 *
 *       Filename:  Bitmap.c
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  10/29/2013 01:11:06 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Robert (), 1198023575@qq.com
 *   Organization:  DaLian JiaoTong University
 *
 * =====================================================================================
 */

#include <stdio.h>
#include "bitmap.h"

void print_file_header(BitmapFileHeader* header)
{
    printf("bfType: %c%c\n", *(char*)(&header->bfType), *(((char*)&header->bfType)+1));
    printf("bfSize: %d\n", header->bfSize);
    printf("bfReserved1: %d\n", header->bfReserved1);
    printf("bfReserved2: %d\n", header->bfReserved2);
    printf("bfOffBits: %d\n", header->bfOffBits);
}

void print_info_header(BitmapInfoHeader* header)
{
    printf("biSize: %d\n", header->biSize);
    printf("biWidth: %d\n", header->biWidth);
    printf("biHeight: %d\n", header->biHeight);
    printf("biPlanes: %d\n", header->biPlanes);
    printf("biBitsPerPixel: %d\n", header->biBitsPerPixel);
    printf("biCompression: %d\n", header->biCompression);
    printf("biImageSize: %d\n", header->biImageSize);
    printf("biXPixelsPerMeter: %d\n", header->biXPixelsPerMeter);
    printf("biYPixelsPerMeter: %d\n", header->biYPixelsPerMeter);
    printf("biClrUsed: %d\n", header->biClrUsed);
    printf("biClrImportant: %d\n", header->biClrImportant);
}
